package com.alex.lombok.delegate;

import lombok.experimental.Delegate;

import java.util.ArrayList;
import java.util.Collection;

/**
 * Author  : gaojun            <br/>
 * Date    : 2020/5/14                          <br/>
 * Time    : 6:04 下午                         <br/>
 * ---------------------------------------    <br/>
 * Desc    :
 */
public class DelegationExample {
    private interface SimpleCollection {
        boolean add(String item);
        boolean remove(Object item);
        Object[] toArray();
    }

    @Delegate(types=SimpleCollection.class)
    private final Collection<String> collection = new ArrayList<String>();
}
